/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
*   Nick Kreeger
* Portions created by the Initial Developer are Copyright (C) 2006-2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*   Nick Kreeger <nick.kreeger@park.edu>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */

#import <Cocoa/Cocoa.h>
#import "MailWindowController.h"

@class MessageHeader;

typedef enum {
  eNew = 0,
  eReply,
  eReplyAll,
  eForwardAsAttachment,
  eForwardInline,
  eNewsPost,
  eReplyToSender,
  eReplyToGroup,
  eReplyToSenderAndGroup,
  eDraft,
  eTemplate,
  eMailToUrl,
  eReplyWithTemplate
} EMsgCompType;


/**
 * This class is a provided in a singleton service for easy communication
 * to create composer windows for new, replied, and forwarded messages.
 */
@interface MessageComposeService : NSObject
{
@private
  // let's use a delegate in the future?
  MailWindowController* mMailWindowController;  // weak ref
  NSMutableArray*       mComposerWindows;       // strong ref
}

/**
 * Get the shared singleton instance of the application-level composer service.
 * @return The shared instance of |MessageComposeService|.
 */
+(id)sharedComposeService;

/**
 * Tell the service of the current main |MailWindowController|. Any time a MWC becomes
 * the main window, it should notify this class so it can recieve any notifications 
 * about the composer status.
 * @param aWindowController The current main |MailWindowController| instance.
 */
-(void)setWindowController:(MailWindowController*)aWindowController;

/**
 * Add 'to:' contacts to either the existing main composer window, or create a new window
 * with the passed in contacts.
 * 
 * Kreeger: As of 0.2, this method is not defined.
 *
 * @param inContacts An array of |Contact| objects.
 */
-(void)appendToContacts:(NSArray*)inContacts;

/**
 * Create a new message with a comma-seperated to and cc contact values.
 * @param inToContacts A comma-seperated string of email addresses to add to the 'to:' field.
 * @param inCcContacts A comma-seperated string of email addresses to add to the 'cc:' field.
 */
-(void)createNewMessageTo:(NSString*)inToContacts cc:(NSString*)inCcContacts;

-(void)createNewMessage;

-(void)replyToMessageUri:(NSString*)aMessageUri;
-(void)replyToAllMessageUri:(NSString*)aMessageUri;
-(void)forwardMessageUri:(NSString*)aMessageUri;

@end
